import request from '@/utils/request'

#if(${pathPrefix} && ${pathPrefix} != "")
//添加/更新接口
export const AddOrUpdateApi = (data) => {
    if (data.id) {
        return request.post('${pathPrefix}/${lowerName}/update', data)
    } else {
        return request.post('${pathPrefix}/${lowerName}/save', data)
    }
}

//批量删除接口
export const removeApi = (ids) => {
    return request.get('${pathPrefix}/${lowerName}/remove/', {
        params: {ids: ids}
    });
};

//分页查询接口
export const findPageApi = (pageRequest) => {
    return request.post('${pathPrefix}/${lowerName}/findPage', pageRequest)
};
#else
//添加/更新接口
export const AddOrUpdateApi = (data) => {
    if (data.id) {
        return request.post('/${lowerName}/update', data)
    } else {
        return request.post('/${lowerName}/save', data)
    }
}

//批量删除接口
export const removeApi = (ids) => {
    return request.get('/${lowerName}/remove/', {
        params: {ids: ids}
    });
};

//分页查询接口
export const findPageApi = (pageRequest) => {
    return request.post('/${lowerName}/findPage', pageRequest)
};
#end